package com.tjc.media.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tjc.media.mapper.AttachmentMapper;
import com.tjc.media.domain.Attachment;
import com.tjc.media.service.IAttachmentService;

/**
 * 系统附件Service业务层处理
 * 
 * @author å¤§æ ¹æä¼
 * @date 2025-09-23
 */
@Service
public class AttachmentServiceImpl implements IAttachmentService 
{
    @Autowired
    private AttachmentMapper attachmentMapper;

    /**
     * 查询系统附件
     * 
     * @param id 系统附件主键
     * @return 系统附件
     */
    @Override
    public Attachment selectAttachmentById(Long id)
    {
        return attachmentMapper.selectAttachmentById(id);
    }

    /**
     * 查询系统附件列表
     * 
     * @param attachment 系统附件
     * @return 系统附件
     */
    @Override
    public List<Attachment> selectAttachmentList(Attachment attachment)
    {
        return attachmentMapper.selectAttachmentList(attachment);
    }

    /**
     * 新增系统附件
     * 
     * @param attachment 系统附件
     * @return 结果
     */
    @Override
    public int insertAttachment(Attachment attachment)
    {
        return attachmentMapper.insertAttachment(attachment);
    }

    /**
     * 修改系统附件
     * 
     * @param attachment 系统附件
     * @return 结果
     */
    @Override
    public int updateAttachment(Attachment attachment)
    {
        return attachmentMapper.updateAttachment(attachment);
    }

    /**
     * 批量删除系统附件
     * 
     * @param ids 需要删除的系统附件主键
     * @return 结果
     */
    @Override
    public int deleteAttachmentByIds(Long[] ids)
    {
        return attachmentMapper.deleteAttachmentByIds(ids);
    }

    /**
     * 删除系统附件信息
     * 
     * @param id 系统附件主键
     * @return 结果
     */
    @Override
    public int deleteAttachmentById(Long id)
    {
        return attachmentMapper.deleteAttachmentById(id);
    }
}
